Compositional Type Systems for Stack-Based Low-Level Languages

نویسندگان

  • Ando Saabas
  • Tarmo Uustalu
چکیده

It is widely believed that low-level languages with jumps must be difficult to reason about by being inherently non-modular. We have recently argued that this in untrue and proposed a novel method for developing compositional natural semantics and Hoare logics for low-level languages and demonstrated its viability on the example of a simple low-level language with expressions (Saabas & Uustalu 2005). The central idea is to use the implicit structure of finite disjoint unions present in low-level code as an (ambiguous) phrase structure. Here we apply our method to a stack-based language and develop it further. We define a compositional natural semantics and Hoare logic for this language and go then on to show that, in addition to Hoare logics, one can also derive compositional type systems as weaker specification languages with the same method. We describe type systems for stackerror freedom and secure information flow.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Typing Tools for Typeless Stack Languages

Many low-level runtime engines and virtual machines are stack based instructions take parameters from the stack and leave their results on the stack. Stack language is a common name for several languages used to program stack based (virtual) machines like CLR, JVM, Forth, Postscript, etc. We chose the Forth language as an example to represent the class of stack languages, partially because this...

متن کامل

Technical Report 2009 - 001 Unrestricted and Disjoint Operations over Multi - Stack Visibly

Visibly Pushdown Languages (VPL) have been proposed as a formalism useful for specifying and verifying complex, recursive systems such as application software. However, VPL turn out to be unsuitable for the compositional specification of concurrent software, as they are not closed under shuffle. Multi-stack Visibly Pushdown Languages (MVPL) express naturally concurrent constructions. We find ho...

متن کامل

Defunctionalisation as Typed Closure Conversion: Compositional Reasoning and Specification

We study the problem of translating from call-by-value pcf to a typed first-order low-level language. Such translations are typically defined by induction on the structure of the source term. Each sub-term is translated to a low-level program fragment and the translation of the whole term is a composition of these fragments. It is desirable to follow this compositional approach also in reasonin...

متن کامل

Alternating Regular Tree Grammars in the Framework of Lattice-Valued Logic

In this paper, two different ways of introducing alternation for lattice-valued (referred to as {L}valued)  regular tree grammars and {L}valued top-down tree automata are compared. One is the way which defines the alternating regular tree grammar, i.e., alternation is governed by the non-terminals of the grammar and the other is the way which combines state with alternation. The first way is ta...

متن کامل

Typing Functional Stack-Based Languages

Stack-based languages (e.g. Forth (Moore 1974), Postscript (Inc. 1999)) have been around for nearly four decades. They are particularly popular today for use as intermediate languages (e.g. CIL (ECMA 2002), JVML (Lindholm and Yellin 1999), (Morrisett et al. 1998)). This is for several reasons: they have good run-time performance characteristics, they resemble the machine level instructions on m...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006